home *** CD-ROM | disk | FTP | other *** search
- //*************** GLOBALS VARS *****************
-
-
- //******************* BEHAVIOR FUNCTIONS **********************
-
-
- function GrpDown(grp){
- var i,j=0,downSrc,downOver,objName;
- var cmd = "'" + grp + "'";
- var docGroup=false;
- for (i=1; i < (GrpDown.arguments.length-2); i+=3) {
- objName = GrpDown.arguments[i];
- downSrc = GrpDown.arguments[i+1];
- downOver = GrpDown.arguments[i+2];
- if(!downOver) downOver = downSrc;
- var docGroup = FindGroup(grp, objName);
- if (!docGroup || !downSrc) continue;
- obj = FWFindImage(document,objName,0);
- if (!obj) continue;
- obj.atRestSrc = downSrc; obj.downOver = downOver;
- obj.src = downOver; obj.isDown = true;
- obj.skipMe = true;
- cmd += ",'" + objName + "','" + downSrc + "','" + downOver + "'";
- j++;
- }
- setCookie(grp, cmd);
- if (!docGroup) return;
- var theImages = docGroup.theImages;
- if (theImages) {
- for (i=0; i<theImages.length; i++) {
- var curImg = theImages[i];
- if (curImg && !curImg.skipMe) {
- curImg.atRestSrc = curImg.initialSrc;
- curImg.isDown = false; curImg.downOver = false;
- curImg.src = curImg.initialSrc;
- }
- curImg.skipMe = false;
- }
- }
- }
- function FWFindImage(doc, name, j)
- {
- var theImage=false;
- if (doc.images) {
- theImage = doc.images[name];
- }
- if (theImage) return theImage;
- if (doc.layers) {
- for (j=0; j<doc.layers.length; j++) {
- theImage = FWFindImage(doc.layers[j].document, name, 0);
- if (theImage) return(theImage);
- }
- }
- return(false);
- }
-
- function setCookie(name, value) {
- document.cookie = name + "=" + escape(value)
- }
-
- function getCookie(Name) {
- var search = Name + "="
- var retVal = "";
- if (document.cookie.length > 0) { // if there are any cookies
- offset = document.cookie.indexOf(search);
- if (offset != -1) { // if cookie exists
- // set index of beginning of value
- end = document.cookie.indexOf(";", offset)
- // set index of end of cookie value
- offset += search.length
- if (end == -1)
- end = document.cookie.length;
- retVal = unescape(document.cookie.substring(offset, end)) ;
- }
- }
- return(retVal);
- }
-
- function InitGrp(grp) {
- var cmd = false; if (getCookie) cmd = getCookie(grp);
- if (cmd) {
- eval("GrpDown("+cmd+")");
- eval("GrpRestore("+cmd+")");
- }
- }
- function FindGroup(grp, imageName) {
- var img = FWFindImage(document, imageName, 0);
- if (!img) return(false);
- var docGroup = eval("document.FWG_"+grp);
- if (!docGroup) {
- docGroup = new Object;
- eval("document.FWG_"+grp+" = docGroup");
- docGroup.theImages = new Array;
- }
- if (img) {
- var i;
- for (i=0; i<docGroup.theImages.length; i++) {
- if (docGroup.theImages[i] == img) break;
- }
- docGroup.theImages[i] = img;
- if (!img.atRestSrc) {
- img.atRestSrc = img.src;
- img.initialSrc = img.src;
- }
- }
- return(docGroup);
- }
- function GrpRestore(grp){
- var docGroup = eval("document.FWG_"+grp);if (!docGroup) return;
- theImages = docGroup.theImages;
- if (theImages) {
- for (i=0; i<theImages.length; i++) {
- var curImg = theImages[i];
- if (curImg.atRestSrc) {
- curImg.src = curImg.atRestSrc;
- }
- }
- }
- }
-
- //Preloads multiple images files in order. Accepts a variable number of args
- //(each should be quoted):
- // imgURL - an image filename, URL encoded. (ex: file.gif, http://www.x.com/y.gif)
- //
- //Creates a new array of Image objects. With each one, it assigns an image source
- //from the argument list. These are downloaded essentially simultaneously into the
- //client cache. When the user needs a new image file (for example: they go to the
- //next web page), the browser should quickly find this image in the cache.
- //!!! IMPORTANT !!! This function is also defined in file "Preload Images.htm".
- //Any edits must be made there as well as here.
-
- function MM_preloadImages() { //v2.0
- if (document.images) {
- var imgFiles = MM_preloadImages.arguments;
- if (document.preloadArray==null) document.preloadArray = new Array();
- var i = document.preloadArray.length;
- with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
- preloadArray[i] = new Image;
- preloadArray[i++].src = imgFiles[j];
- } }
- }
-
-
-
- //******************* API **********************
-
-
- //Checks for the existence of images.
- //If none exist, returns false so this Action is grayed out.
-
- function canAcceptBehavior(){
- var retVal = "";
- var imgs = getAllObjectRefs("IE 4.0","IMG");
- if (imgs.length > 0) {
- retVal = "onClick";
- }
- if (retVal)
- return retVal;
- return false;
- }
-
-
-
- //Returns Javascript functions to be inserted in HTML head with script tags.
-
- function behaviorFunction(){
- return "MM_preloadImages,FindGroup,InitGrp,GrpRestore,getCookie,setCookie,FWFindImage,GrpDown"
- }
-
-
-
- //Returns fn call to insert in HTML tag <TAG... onEvent='thisFn(arg)'>
- //Gets list of imgSrcs from doc attribute. With each imgSrc, it gets the parallel
- //img name from select 'menu'. Each imgSrc & imgObj are embedded as args.
- function applyBehavior() {
- /*
- return "grpOver('Joe', 'Foo', 'foo.img');"
- }
- */
- var retVal="",i,j,argList="",fnArray,imgSrcArray,imgSrc,imgObj,imgObjIE,newName;
- var imgObjsArray=document.MM_imgObjsArray;
- var img2Src,imgList="";
-
- grpName = document.theForm.grpName.value;
- imgSrcArray = document.MM_myImgSrcs; //get global list of imgSrcs
- for (i=0; i<imgSrcArray.length; i++) { //with each imgSrc
- imgSrc = imgSrcArray[i];
- img2Src = document.MM_myImgSrcs2[i];
- if (imgSrc) { //if not empty
- if (argList) argList += ","; //if stuff already in list, add comma
- theName = imgObjsArray[i].getAttribute("name");
- if (!theName){ //if the image is unnamed
- //from this array, get unique image name
- newName = getUniqueName("IMG","Image",imgObjsArray);
- imgObjsArray[i].setAttribute("name",newName); //rename image in document
- }
- theName = imgObjsArray[i].getAttribute("name");
- argList += "'"+escape(theName)+"','"+escape(imgSrc)+"','" + escape(img2Src) + "'";
- imgList += (imgList?",":"")+"'"+escape(imgSrc)+"','" + escape(img2Src) + "'";
- break;
- }
- }
- if (!argList) retVal = MSG_NoImgsSelected;
- else { //OK
- //Add or remove MM_swapImgRestore() based on checkbox setting
- selObj = dreamweaver.getBehaviorElement();
- if (!selObj){
- selArr = dreamweaver.getSelection();
- selObj = dreamweaver.offsetsToNode(selArr[0],selArr[1]);
-
- }
-
- //Add or remove MM_preloadImages() based on checkbox setting
- var obj = dreamweaver.getDocumentDOM("document").body;
- if (document.theForm.preload.checked) { //add preload call to onLoad handler
- argList += ",\'"+document.preloadId+"\'"; //add uniqueName to main fn call
- setHandler(obj,"onLoad","MM_preloadImages("+imgList+",'"+document.preloadId+"')",document.preloadId);
- } else {
- delHandler(obj,"onLoad","MM_preloadImages",document.preloadId);
- }
- var theInit = "InitGrp('" + grpName + "')";
- setHandler(obj, "onLoad", theInit, grpName);
-
- if (document.theForm.restore) {
- var theRestore = "GrpRestore('" + grpName + "')";
- if (document.theForm.restore.checked) { //add restore to onMouseOut handler
- setHandler(selObj,'onMouseOut',theRestore);
- } else { //remove it
- delHandler(selObj,'onMouseOut', 'GrpRestore', grpName);
- }
- }
-
- retVal = "GrpDown('"+grpName+"'," + argList+")"; //create correct function call
- }
- return retVal
- }
-
-
- //Given the original function call, this parses out the args and updates
- //the UI. Loops through each imgObj,imgSrc pair.
- //If imgObj already present in menu, stuff imgSrc in imgSrcArray. If imgObj
- //doesn't exist, add to menu, and extend imgSrcArray.
-
- function inspectBehavior(behFnCallStr){
- var argArray,imgSrcArray,imgSrcArray2,found,numImgs,i,imgObj,imgSrc,imgSrc2,j,imgObjNum;
- var imgsArray = document.MM_imgObjsArray = createObjsArray("IMG");
-
- argArray = extractArgs(behFnCallStr);//get new list of imgObj,imgSrc pairs
- imgSrcArray = document.MM_myImgSrcs; //get the prior list of imgSrcs
- imgSrcArray2 = document.MM_myImgSrcs2; //get the prior list of imgSrcs
- group=unescQuotes(argArray[1]);
- numImgs = document.MM_imgObjsArray.length;
- for (i=2; i<(argArray.length-2); i+=3){ //with each imgObj,imgSrc pair
- imgName=unescQuotes(argArray[i]);
- imgSrc=unescape(argArray[i+1]);
- imgSrc2=unescape(argArray[i+2]);
- found = false;
- for (j=0; j<numImgs; j++){ //check if imgObj is in ref list
- theName = document.MM_imgObjsArray[j].getAttribute("name");
- if (theName == imgName) { //if imgObj there
- imgSrcArray[j] = imgSrc; //store imgSrc at that pos
- imgSrcArray2[j] = imgSrc2; //store imgSrc at that pos
- if (imgSrc) addStarToMenuItem(document.theForm.menu,j);//if non-empty, mark with *
- found = true;
- break;
- }
- }
- if (!found) alert(errMsg(MSG_ImgNotFound,imgName,imgSrc)); //if image name not found
- }
- document.theForm.grpName.value = group;
- document.MM_myImgSrcs = imgSrcArray; //save updated imageSrc list
- document.MM_myImgSrcs2 = imgSrcArray2; //save updated imageSrc list
- displayImgSrc(); //load the imageSrc for selected image
-
- //Determine if preloading, get id
- if (i < argArray.length) document.preloadId = argArray[i]; //unique id exists, get it
- document.theForm.preload.checked = (argArray.length > i); //if preload, check box
-
- //If restore checkbox is available, see if MM_swapImgRestore() exists, and check the box
- var theObj = findObject("restoreOption");
- if (theObj) { //restore checkbox is a possibility
- var selObj=dreamweaver.getBehaviorElement();
- if (selObj && selObj.tagName != "A") selObj = selObj.parentNode; //move out to A tag if needed
- if (selObj && selObj.tagName == "A") if (document.theForm.restore) {
- document.theForm.restore.checked = getHandler(selObj,'onMouseOut','GrpRestore', group);
- }
- }
- }
-
- //Given the original function call, this parses out the args and updates
- //the code. If there's a preload id at the end of the arglist, deletes
- //the preload handler. If there's a swap restore call, deletes that.
-
- function deleteBehavior(behFnCallStr){
- var argArray,obj,selArr,selObj;
-
- obj = dreamweaver.getDocumentDOM("document").body;
- argArray = extractArgs(behFnCallStr);//get new list of imgObj,imgSrc pairs
- group=unescQuotes(argArray[1]);
- var otherGrp = "GrpDown('"+group+"'";
- if (obj.innerHTML.indexOf(otherGrp) == -1) {
- // last down for this group.
- delHandler(obj,"onLoad","InitGrp",group);
- }
-
- //Maybe remove preload handler
- if ((argArray.length-2)%3 == 1) { //if extra arg
- document.preloadId = argArray[argArray.length-1]; //unique id exists, get it
- if (obj.innerHTML.indexOf(document.preloadId) == -1) // if swap image not just moved
- delHandler(obj,"onLoad","MM_preloadImages",document.preloadId);
- }
-
- }
-
-
-
- //***************** LOCAL FUNCTIONS ******************
-
- //Load the select menu with image names.
- //Also sets the global property MM_myImgSrcs to the right num of items.
-
- function initializeUI(){
- var niceNameSrcArray, nameArray, i, selTag="";
- var imgSrcArray = new Array();
- var imgSrcArray2 = new Array();
-
- //Determine if RESTORE is an option. If not, remove UI for it
- //the dreamweaver.getBehaviorTag() check ensures the checkbox
- //is not available if a behavior is attached to a timeline
- var removeCheckbox = false;
- if (!dreamweaver.getBehaviorTag() ) //if behavior is in a timeline
- removeCheckbox = true;
- else{
- if (dreamweaver.getBehaviorElement()) selTag = dreamweaver.getBehaviorElement().tagName;
- if (!selTag) selTag = getSelectionTag();
- if (selTag!="A" && selTag!="IMG") //if sel not A or IMG
- removeCheckbox = true;
- }
- if (removeCheckbox){
- var theObj = findObject("restoreOption");
- if (theObj) theObj.outerHTML = ""; //remove restoreOption checkbox
- }
-
-
- //Create unique ID in case of preload
- document.preloadId = "#"+((new Date()).getTime());
-
- //Build and load picklist of images
- niceNameSrcArray = getAllObjectRefs("IE 4.0","IMG");
- nameArray = niceNames(niceNameSrcArray,TYPE_Image);
- for (i=0; i<nameArray.length; i++){
- document.theForm.menu.options[i]=new Option(nameArray[i]); //load menu
- imgSrcArray[i] = "";
- imgSrcArray2[i] = "";
- }
- pickSelectedImage(); //if an image is selected, selects it in the picklist
- document.MM_myImgSrcs = imgSrcArray; //set global
- document.MM_myImgSrcs2 = imgSrcArray2; //set global
-
- document.theForm.imgSrc.focus(); //set focus on textbox
- document.theForm.imgSrc.select(); //set insertion point into textbox
- }
-
- //Given imageSrc in form, looks up the menu's selection number, and stores the
- //new imageSrc at that position in the global document property "MM_myImgSrcs".
-
- function storeImgSrc(){
- var newImgSrc, imgSrcArray, menuIndex, newMenuText;
-
- newImgSrc = document.theForm.imgSrc.value;
- imgSrcArray = document.MM_myImgSrcs; //get the prior list of imgSrcs
- menuIndex = document.theForm.menu.selectedIndex; //get index to swap
- imgSrcArray[menuIndex] = newImgSrc; //swap
- document.MM_myImgSrcs = imgSrcArray; //rewrite list
- if (newImgSrc) { //if non-empty, mark with *
- addStarToMenuItem(document.theForm.menu, menuIndex);
- } else { //nothing to store, strip off any previous star
- newMenuText = stripStar(document.theForm.menu.options[menuIndex].text); //remove if old star
- document.theForm.menu.options[menuIndex]=new Option(newMenuText); //add new line to menu
- }
- document.theForm.menu.selectedIndex = menuIndex; //reset selection index
- }
-
- function storeImgSrc2(){
- var newImgSrc, imgSrcArray2, menuIndex, newMenuText;
-
- newImgSrc = document.theForm.imgSrc2.value;
- imgSrcArray2 = document.MM_myImgSrcs2; //get the prior list of imgSrcs
- menuIndex = document.theForm.menu.selectedIndex; //get index to swap
- imgSrcArray2[menuIndex] = newImgSrc; //swap
- document.MM_myImgSrcs2 = imgSrcArray2; //rewrite list
- if (newImgSrc) { //if non-empty, mark with *
- addStarToMenuItem(document.theForm.menu, menuIndex);
- } else { //nothing to store, strip off any previous star
- newMenuText = stripStar(document.theForm.menu.options[menuIndex].text); //remove if old star
- document.theForm.menu.options[menuIndex]=new Option(newMenuText); //add new line to menu
- }
- document.theForm.menu.selectedIndex = menuIndex; //reset selection index
- }
-
-
-
- //Looks at the menu of names, and returns the imgSrc associated with the
- //selected item. Example: if the 2nd menu item's selected, returns 2nd item
- //stored in property "MM_myImgSrcs".
-
- function displayImgSrc(){
- var imgSrcArray, imgSrcArray2, curImageSrcNum, imgSrc, imgSrc2;
-
- imgSrcArray = document.MM_myImgSrcs; //get the list of imgSrcs
- imgSrcArray2 = document.MM_myImgSrcs2; //get the list of imgSrcs
- curImageSrcNum = document.theForm.menu.selectedIndex; //get index selected
- imgSrc = imgSrcArray[curImageSrcNum]; //lookup imgSrc
- imgSrc2 = imgSrcArray2[curImageSrcNum]; //lookup imgSrc
- document.theForm.imgSrc.value= imgSrc; //write into text field
- document.theForm.imgSrc2.value= imgSrc2; //write into text field
- }
-
-
-
- //Invokes dialog to allow user to select filename. Puts value in text input.
-
- function browseFileAndStore(){
- var fileName;
- fileName = browseForFileURL("select", "", true); //returns a local filename
- if (fileName) {
- document.theForm.imgSrc.value = fileName;
- storeImgSrc();
- }
- }
-
- //Invokes dialog to allow user to select filename. Puts value in text input.
-
- function browseFileAndStore2(){
- var fileName;
- fileName = browseForFileURL("select", "", true); //returns a local filename
- if (fileName) {
- document.theForm.imgSrc2.value = fileName;
- storeImgSrc2();
- }
- }
-
-
- function pickSelectedImage(){
- var imgsArray = document.MM_imgObjsArray = createObjsArray("IMG");
- var arrLen = imgsArray.length;
- var selArr = dreamweaver.getSelection();
- var selObj = dreamweaver.offsetsToNode(selArr[0],selArr[1]);
-
- for (i=0;i<arrLen;i++){
- if (imgsArray[i]==selObj)
- document.theForm.menu.selectedIndex=i;
- }
- }
-
- function identifyBehaviorArguments(fnCallStr) {
- var argList, argArray, numArgGroups, i;
-
- argList = "ignore"; /* ignore the group name */
- argArray = extractArgs(fnCallStr);
- numArgGroups = (argArray.length - 2) / 3; //args come in triples
- for (i=0; i<numArgGroups; i++) { //with each NSobj,IEobj,URL triplet
- argList += ((argList)?",":"")+"ignore,DEP,DEP";
- }
- return argList;
- }
-
- //Creates a unique name for objs of tagName, using tagString
- //for instance: if tagString = Image, returns a name like Image1
- function getUniqueName(tagName,tagString,tagNameObjsArray){
- var frameListSize,objName,dupe=true,counter=1;
- var objsArray=arguments[2],objsArrayLen = objsArray.length;
-
- while (dupe==true){ //check new name against name of all other tagName objs
- dupe=false;
- objName = tagString + counter++;
- //iterates through possible names: tagName1, then tagName2, etc.
- for (i=0;dupe==false && i<objsArrayLen;i++){
- //if another object of this type has the same name
- if (objsArray[i].getAttribute("name") == objName)
- dupe=true; //then repeat the loop, trying a new name
- }
- }
- return objName; //return new name
-
- }
-
- //Returns an array of objects of tagName
- //If doc is in a frameset, searches all frames in parent
- function createObjsArray(tagName){
- var frameListLen,objsArray=new Array(),thisFrame;
- if (dreamweaver.getDocumentDOM('parent')){//if frames
- frameListLen = dreamweaver.getDocumentDOM('parent').getElementsByTagName('frame').length;
- for (i=0;i<frameListLen;i++){
- thisFrame = 'parent.frames[' + i + ']';
- objsArray = objsArray.concat(dreamweaver.getDocumentDOM(thisFrame).getElementsByTagName(tagName));
- }
- } else //if no frames
- objsArray = dreamweaver.getDocumentDOM("document").getElementsByTagName(tagName);
- return objsArray;
- }
-
- //*************** GENERIC DOM MANIPULATION FNS *****************
-
- //Returns a function call if exists in event handler.
- // obj - DOM object, such as dreamweaver.getDocumentDOM().body
- // eventName - "onLoad", "onClick" etc (not case sensitive)
- // fnName - "MM_preloadImages" etc.
- // optStr - (optional) function call must contain this string to be found
- //Given <TAG onEvent="aaa();bbb();ccc()">,
- //calling getHandler(tagObj,'onEvent','bbb') will
- //return "bbb()". Returns empty if event or fn don't exist.
-
- function getHandler(obj,eventName,fnName, optStr) {
- var eventStr,fnArray,i,theChunk,retVal = "";
- eventStr = obj.getAttribute(eventName);
- if (eventStr) { //find previous call, or add it
- fnArray = dreamweaver.getTokens(eventStr,";");
- for (i=0; i<fnArray.length; i++) { //look at each code chunk
- if (fnArray[i].indexOf(fnName+'(') != -1 && (!optStr || //fn call found
- fnArray[i].indexOf(optStr) != -1)) {
- retVal = fnArray[i]; break;
- } }
- }
- return retVal
- }
-
-
-
- //Replaces or adds a fn call to an event handler
- // obj - DOM object, such as dreamweaver.getDocumentDOM().body
- // eventName - "onLoad", "onClick" etc (not case sensitive)
- // fnCall - "myFun('arg1','arg2')" etc.
- // optStr - (optional) function call must contain this string to be found
- //Given <TAG onEvent="aaa();bbb();ccc()">,
- //calling setHandler(tagObj,'onEvent','bbb(1,2)') will
- //replace "bbb()" with the altered fn call. If the event
- //does not exist, adds it. It fn didn't exist, adds it to the
- //end of the list.
-
- function setHandler(obj,eventName,fnCall, optStr) {
- var eventStr,fnName,fnArray=new Array(),i=0;
- eventStr = obj.getAttribute(eventName);
- if (eventStr) { //if event exists
- fnName = fnCall.substring(0,fnCall.indexOf("("));
- fnArray = dreamweaver.getTokens(eventStr,";");
- for (i; i<fnArray.length; i++) //search for fnName
- if (fnArray[i].indexOf(fnName+'(') != -1 && (!optStr || //fn call found
- fnArray[i].indexOf(optStr) != -1)) break;
- }
- fnArray[i] = fnCall;
- obj.setAttribute(eventName,fnArray.join(";"));
- return true
- }
-
-
-
- //Deletes a fn call from an event handler
- // obj - DOM object, such as dreamweaver.getDocumentDOM().body
- // eventName - "onLoad", "onClick" etc (not case sensitive)
- // fnName - "MM_preloadImages" etc.
- // optStr - (optional) function call must contain this string to be found
- //Given <TAG onEvent="aaa();bbb();ccc()">,
- //calling delHandler(tagObj,'onEvent','bbb') will
- //remove "bbb();". If it is the last fn in the handler,
- //removes the event entirely.
-
- function delHandler(obj,eventName,fnName, optStr) {
- var eventStr,fnArray=new Array(),i=0,j;
- eventStr = obj.getAttribute(eventName);
- if (eventStr) { //if event exists
- fnArray = dreamweaver.getTokens(eventStr,";");
- for (i; i<fnArray.length; i++) { //look at each code chunk
- if (fnArray[i].indexOf(fnName+'(') != -1 && (!optStr || //fn call found
- fnArray[i].indexOf(optStr) != -1)) { //and, if given, optStr exists
- if (fnArray.length == 1) { //if last one, remove attribute
- obj.removeAttribute(eventName);
- } else { //pull out
- for (j=i; j<fnArray.length; j++) fnArray[j] = fnArray[j+1]; //shift array
- fnArray.length--;
- obj.setAttribute(eventName,fnArray.join(';'));
- }
- break;
- } }
- }
- return true
- }
-
-
-
- //Returns the tag for the current selection, such as
- //IMG, A, DIV etc. Always uppercase.
-
- function getSelectionTag() {
- var retVal = "";
- var selArr = dreamweaver.getSelection()
- var selObj=dreamweaver.offsetsToNode(selArr[0],selArr[1]);
- if (selObj && selObj.tagName) retVal = selObj.tagName;
- return retVal
- }
-
- //**************** GENERIC FUNCTIONS ****************
-
- //function extractArgs(behFnCallStr){
- //function stripStar(theStr) {
- //function addStarToMenuItem(theSelect,menuIndex) {
- //function escQuotes(theStr){
- //function unescQuotes(theStr){
- //function niceNames(objRefArray,objTypeStr) {
- //function nameReduce (objName) {
- //function errMsg() {
- //function findObject(objName, parentObj) {
-
-
-
- //**************** GENERIC FUNCTIONS ****************
-
- //function extractArgs(behFnCallStr){
- //function stripStar(theStr) {
- //function addStarToMenuItem(theSelect,menuIndex) {
- //function escQuotes(theStr){
- //function unescQuotes(theStr){
- //function niceNames(objRefArray,objTypeStr) {
- //function nameReduce (objName) {
- //function errMsg() {
- //function findObject(objName, parentObj) {
-